
import request from '@/utils/request'

// 获取设备列表
export function listEquipment(query) {
  return request({
    url: '/EquipmentSimulationController/getEquipmentByPage',
    method: 'get',
    params: query
  })
}

// 查询设备详情
export function getEquipment(query) {
  return request({
    url: '/EquipmentSimulationController/getEquipmentById',
    method: 'get',
    params: query
  })
}

// 新增设备
export function addEquipment(data) {
  return request({
    url: '/EquipmentSimulationController/addEquipment',
    method: 'post',
    data: data
  })
}

// 修改设备
export function updateEquipment(data) {

  return request({
    url: '/EquipmentSimulationController/updateEquipment',
    method: 'post',
    data: data
  })
}

// 删除
export function delEquipment(  data) {
  return request({
    url: '/EquipmentSimulationController/deleteEquipmentById' ,
    method: 'delete',
    params: data
  })
}

//上传
export function uploadImg(data) {
  return request({
    url: '/EquipmentSimulationController/equipmentImg',
    method: 'post',
    data: data,
    uploadFile:true
  })
}